package io.renren.modules.tms.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.datasource.annotation.DataSource;
import io.renren.modules.tms.entity.TmsImportLog;
import io.renren.modules.tms.service.TmsImportLogService;
import io.renren.modules.tms.mapper.TmsImportLogMapper;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
* @author Administrator
* @description 针对表【tms_import_log】的数据库操作Service实现
* @createDate 2023-11-14 09:23:38
*/
@Service
public class TmsImportLogServiceImpl extends ServiceImpl<TmsImportLogMapper, TmsImportLog>
    implements TmsImportLogService{

    @Override
    @DataSource("renren")
    public void insertLog(int line, String msg) {
        try {
            TmsImportLog tmsImportLog = new TmsImportLog();
            tmsImportLog.setCreateTime(new Date());
            tmsImportLog.setLine(line);
            tmsImportLog.setMsg(msg);
            save(tmsImportLog);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}




